
<%@ page import="java.util.*,java.io.*,nidea.*,java.sql.ResultSet" session="true" contentType="text/html" pageEncoding="UTF-8"%>
<%!
    Idea i = new Idea();
    Idea ii;
    String error = null;
    int idc, ide;
    String idp, sql;
%>
<%
            String solucion = request.getParameter("solucion");
            if (solucion == null) {
                error = "Publicar_idea.jsp?error=debes de escribir una solucion";
                response.sendRedirect(error);
            } else {
                idp = request.getParameter("id_problema");
                idc = Integer.parseInt((String)request.getSession().getAttribute("id_creativo"));
                int id = Integer.parseInt(idp);
                ii = i.publicarIdea(id, idc, solucion);
                response.sendRedirect("Publicar_idea_confirmacion.jsp?ididea=" + ii.getIdIdea());
            }
%>